From: Stewart Hildebrand Date: Tue, 27 Feb 2018 15:15:55 +0000 (+0000) Subject: xen/arm: domain_builder: irq sanity check logic fix X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~479 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7bf61602f295676c8b0ff61e4c584fc2bd57e4cf;p=xen.git xen/arm: domain_builder: irq sanity check logic fix Since commit "xen/arm: domain_build: Rework the way to allocate the event channel interrupt", it is not possible for an irq to be both below 16 and greater/equal than 32. Also fix the reference to linux documentation while we're at it. Signed-off-by: Stewart Hildebrand Signed-off-by: Julien Grall Acked-by: Stefano Stabellini [Slightly rework the commit message] --- diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index ed1a393bb5..28ee876b92 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -503,9 +503,10 @@ static void set_interrupt_ppi(gic_interrupt_t interrupt, unsigned int irq, { __be32 *cells = interrupt; - BUG_ON(irq < 16 && irq >= 32); + BUG_ON(irq < 16); + BUG_ON(irq >= 32); - /* See linux Documentation/devictree/bindings/arm/gic.txt */ + /* See linux Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt */ dt_set_cell(&cells, 1, 1); /* is a PPI */ dt_set_cell(&cells, 1, irq - 16); /* PPIs start at 16 */ dt_set_cell(&cells, 1, (cpumask << 8) | level);